﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage2.master" AutoEventWireup="true" CodeFile="Admin_QuanLyThongTinSieuThi.aspx.cs" Inherits="ChucNang_Admin_Admin_QuanLyThongTinSieuThi" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">


<center>
<h2>QUẢN LÝ THÔNG TIN SIÊU THỊ</h2>

<table border="0" cellspacing="10" cellpadding="0" width="100%">
	<tr>
		<td class="itemHeader"> Logo</td>
	</tr>
	<tr>
		<td>
		    <table border="0" cellspacing="0" cellpadding="0" width="100%">
		    	<tr>
		    		<td>Upload logo:
		    		</td>
		    	</tr>
		    	<tr>
		    		<td style="padding-left:100px;">
                        <asp:FileUpload ID="FileUploadLogo" runat="server" />
                        <asp:Button ID="btnUploadLogo" runat="server"
                            Text="Upload" onclick="btnUploadLogo_Click" />
		    		</td>
		    	</tr>
		    	<tr>
		    		<td>Logo hiện có:
		    		</td>
		    	</tr>
		    	<tr>
		    		<td style="padding-left:100px;">
		    		<%
                        DataDSTableAdapters.THIETLAP_WEBSITETableAdapter tlAdapter = new DataDSTableAdapters.THIETLAP_WEBSITETableAdapter();
                        DataDS.THIETLAP_WEBSITEDataTable tlTable =  tlAdapter.THIETLAP_WEBSITE_LayThongTinTheoTenNhom("Logo");
                        for (int i = 0; i < tlTable.Rows.Count; i++ )
                        {
                            if ((bool)tlTable[i]["Is_Current"] == true)
                                Response.Write("<input name='logo' checked='checked' type='radio' value='" + tlTable[i]["GiaTri"] + "'/><img src='" + tlTable[i]["GiaTri"] + "' height='46px' width='238'/><br/><br/>");
                            else
                                Response.Write("<input name='logo' type='radio' value='" + tlTable[i]["GiaTri"] + "'/><img src='" + tlTable[i]["GiaTri"] + "' height='46px' width='238px'/><br/><br/>");
                        }
		    		    
		    		    
		    		 %>
		    		</td>
		    	</tr>
		    	<tr>
		    	    <td align="center">
                        <asp:Button ID="btnSaveLogo" runat="server" Text="Cập nhật" 
                            onclick="btnSaveLogo_Click" />
                        <asp:Button ID="btnXoaLogo" runat="server" Text="Xóa Logo" 
                            onclick="btnXoaLogo_Click" />
		    	    </td>
		    	</tr>
		    	
		    </table>
		
		</td>
	</tr>
	<tr>
		<td class="itemHeader">Thông tin siêu thị</td>
	</tr>
	<tr>
		<td>
            <asp:DataList ID="DataList1" runat="server">
            <ItemTemplate>
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                	<tr>
                		<td>
                            <asp:Label ID="lbTenThamSo" runat="server" Text='<%#Eval("TenThamSo") %>'></asp:Label>
                            <asp:TextBox ID="txtGiaTri" runat="server" Text='<%#Eval("GiaTri") %>'></asp:TextBox>
                		</td>
                	</tr>
                </table>
            </ItemTemplate>
            </asp:DataList>
		</td>
	</tr>
	<tr>
	    <td align="center">
            <asp:Button ID="btnCapNhatThongTin" runat="server" Text="Cập nhật" 
                onclick="btnCapNhatThongTin_Click" />
	    </td>
	</tr>
	<tr>
		<td class="itemHeader">Thêm thông tin</td>
	</tr>
	<tr>
	    <td>Tên thông tin:<asp:TextBox ID="txtTenThamSoThem" runat="server"></asp:TextBox>
	        Giá trị:<asp:TextBox ID="txtGiaTriThem" runat="server"></asp:TextBox>
            <asp:Button ID="btnThemThongTin" runat="server" Text="Thêm" 
                onclick="btnThemThongTin_Click" />
	    </td>
	</tr>
	
</table>


</center>

</asp:Content>

